package com.jietong.rfid.uhf.dao;

import java.util.Map;

import com.jietong.rfid.uhf.callback.CallBack;
import com.jietong.rfid.uhf.callback.CallBack.R2000;
import com.jietong.rfid.uhf.dao.impl.R2000Reader;
import com.jietong.rfid.util.AntStruct;
import com.jietong.rfid.util.FrequencyPoint;

public interface R2000ReaderDao {
	R2000Reader serialPortConnect(String portName, int baudRate, CallBack.R2000 callBack);
	
	boolean disconnect(R2000Reader reader);
	
	String version(R2000Reader reader);
	
	@Deprecated
	boolean invOnce(R2000Reader reader);
	
	@Deprecated
	boolean beginInv(R2000Reader reader);

	@Deprecated
	boolean stopInv(R2000Reader reader);
	
	AntStruct getAntenna(R2000Reader reader);
	
	boolean setAntenna(R2000Reader reader, AntStruct ant);
	
	boolean writeTagData(R2000Reader reader, int bank, int begin, int length, String data, byte[] password);
	
	String readTagData(R2000Reader reader, byte bank, byte begin, byte length, byte[] password);
	
	boolean lockTag(R2000Reader reader, byte locktType, byte lockBank, byte[] password);
	
	int getBuzzer(R2000Reader reader);
	
	boolean setBuzzer(R2000Reader reader, byte state);
	
	boolean setWorkMode(R2000Reader reader, int mode);
	
	int getWorkMode(R2000Reader reader);
	
	boolean setTriggerModeDelayTime(R2000Reader reader, byte trigTime);
	
	int getTriggerModeDelayTime(R2000Reader reader);
	
	String getDeviceNo(R2000Reader reader);
	
	boolean setDeviceNo(R2000Reader reader, int deviceNo);

	boolean setDeviceConfig(R2000Reader reader, byte[] para);
	
	boolean killTag(R2000Reader reader, byte[] accessPwd, byte[] killPwd);
	
	boolean setOutputMode(R2000Reader reader, byte outputMode);
	
	int getOutputMode(R2000Reader reader);
	
	Map<String,Byte> getAdjacentDiscriminant(R2000Reader reader);
	
	boolean setAdjacentDiscriminant(R2000Reader reader, byte neighJudgeTime);
	
	Map<String, Boolean> getGPIO(R2000Reader reader);
	
	boolean setGPIO(R2000Reader reader, byte port, byte state);
	
	/**************2018-12-03 new add ****************/
	
	boolean invOnceV2(R2000Reader reader);

	boolean beginInvV2(R2000Reader reader);

	boolean stopInvV2(R2000Reader reader);

	Map<String, Integer> getInvPatternConfig(R2000Reader reader);

	boolean setInvPatternConfig(R2000Reader reader, byte session, byte qValue, byte tagFocus, byte abValue);

	boolean factoryDataReset(R2000Reader reader);

	Map<String, Boolean> getInvOutPutData(R2000Reader reader);

	boolean setInvOutPutData(R2000Reader reader, byte antenna, byte rssi, byte deviceNo, byte accessDoorDirection);

	Map<String,Byte> getAntennaStatus(R2000Reader reader);
	
	FrequencyPoint getFrequency(R2000Reader reader);
	
	boolean setFrequency(R2000Reader reader, int type, double frequencyFixed, boolean[] frequencyHopping);
	
	boolean setTriggerModeAlertTime(R2000Reader reader, byte time);
}
